import { lazy } from "react";
import {
  AppOutline,
  AppstoreOutline,
  MessageOutline,
  UserOutline
} from 'antd-mobile-icons'

const Index = lazy(()=>import('../parges/index'))
const Classify = lazy(()=>import('../parges/classifty'))
const Message = lazy(()=>import('../parges/message'))
const User = lazy(()=>import('../parges/user'))
const Home = lazy(()=>import('../parges/home'))
const Login = lazy(()=>import('../parges/login'))
const Detail = lazy(()=>import('../parges/detail'))

export const homeRouters = [
  {
    path: '/',
    element: <Index></Index>,
    title: '首页',
    icon: <AppOutline />
  },
  {
    path: '/classify',
    element: <Classify></Classify>,
    title: '分类',
    icon: <AppstoreOutline />
  },
  {
    path: '/message',
    element: <Message></Message>,
    title: '消息',
    icon: <MessageOutline />
  },
  {
    path: '/user',
    element: <User></User>,
    title: '我的',
    icon: <UserOutline />
  },
]

export const routers = [
  {
    path: '/',
    element: <Home></Home>,
    children: homeRouters
  },
  {
    path: '/login',
    element: <Login></Login>
  },
  {
    path: '/detail/:id',
    element: <Detail></Detail>
  },
]